﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.OleDb;
using System.Data.Common;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SAWPOS
{
    public partial class ListaVentas : Form
    {
        public ListaVentas()
        {
            InitializeComponent();
            DataSet ds = new DataSet();
            ds.ReadXml("..\\..\\xmlData\\xmlVentas.xml");
            gridVentas.DataSource = ds.Tables["Cotizaciones"];
            //for (int x = 0; x < gridVentas.Columns.Count;x++ )
            //    gridVentas.Columns[x].Visible = false;
            
        }

        private void ListaVentas_Load(object sender, EventArgs e)
        {
           
        }

        private void button1_Click(object sender, EventArgs e)
        {
            
            gridVentas.Columns["Total"].ValueType = typeof(System.Decimal);
            //formatoDinero.ForeColor = Color.Red;
            //gridVentas.Columns["Total"].DefaultCellStyle = formatoDinero;
            gridVentas.Columns["Total"].DefaultCellStyle.Format = "C";
            gridVentas.Columns["Total"].DefaultCellStyle.ForeColor = Color.Red;
            gridVentas.Update();
        }

        private void gridVentas_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }
    }
}
